<?php

ini_set("display_errors", 0);

if (isset($_POST["DNI"])){



require_once 'Image/Barcode.php';

header('Content-type: image/png');

Image_Barcode::draw($_POST["DNI"], 'int25', 'png');


/*
require_once("Image/Barcode/Code39.php");

header('Content-type: image/png');

$bc = new Image_Barcode_Code39('',2,4);
$bc->draw($_POST["DNI"], 'png', true, 120);
*/

//@Image_Barcode::draw(12343, 'Code39', 'png');

}
else {

?>

<html>
<body>
<form method="POST">
<input type="text" name="DNI"/>
<input type="submit"/>
</form>

<?php
}
?>